package ua.mykola.backtracking;

import java.util.Arrays;

public class AllSubsets extends Backtrack {

	private final static int FALSE = 0;
	private final static int TRUE = 1;

	public void generate(int n) {
		backtrack(new int[n], 0, n);
	}

	@Override
	void processSolution(int[] a, int k) {
		System.out.println(Arrays.toString(a));

	}

	@Override
	boolean isSolution(int[] a, int k, int input) {
		return k == input;
	}

	@Override
	int[] constructCandidates(int[] a, int k, int input) {
		return new int[] { TRUE, FALSE };
	}

}
